<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 Not Found</title>
    <meta http-equiv="refresh" content="5;url=/" />
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            background-color: #f4f4f4;
            padding: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .container {
            max-width: 600px;
            background: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h1 {
            font-size: 48px;
            color: #ff5555;
        }
        p {
            font-size: 18px;
            color: #666;
        }
        a {
            display: inline-block;
            margin-top: 20px;
            padding: 10px 20px;
            color: white;
            background-color: #007BFF;
            text-decoration: none;
            border-radius: 5px;
        }
        a:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>404</h1>
        <p>Sorry, the page you are looking for does not exist.</p>
        <a href="/" id="countdown-link">Go to Homepage (5)</a>
    </div>

    <script>
        let count = 5;
        const countdownLink = document.getElementById('countdown-link');

        function updateCountdown() {
            count--;
            if (count >= 0) {
                countdownLink.textContent = `Go to Homepage (${count})`;
            } else {
                clearInterval(interval); // 停止定时器
                countdownLink.textContent = 'Go to Homepage'; // 可选：移除倒计时数字
            }
        }

        const interval = setInterval(updateCountdown, 1000); // 每秒更新一次
    </script>
</body>
</html>